package ex;

class Demo2 {
    void show() throws Exception {
        throw new Exception();
    }
}

public class ExceptionDemo5 {

    public static void main(String[] args)/* throws Exception*/ {
        Demo2 demo2 = new Demo2();
        try {
            demo2.show();
        } catch (Exception e) {
            System.out.println("发生了异常");
        }
        System.out.println("hello world");
    }
}

